<?php

namespace Pyaf\GymBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class AlumnoType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('promocion', 'textarea', array('max_length' => 200, 'trim' => 'true'))
            ->add('cuota', 'text')            
            ->add('persona', new PersonaType())
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Pyaf\GymBundle\Entity\Alumno'
        ));
    }

    public function getName()
    {
        return 'pyaf_gymbundle_alumnotype';
    }
}
